$OpenBSD: patch-src_Flow_cpp,v 1.2 2016/07/09 12:14:28 sthen Exp $
--- src/Flow.cpp.orig	Mon Jun 27 20:31:18 2016
+++ src/Flow.cpp	Sat Jul  9 12:55:43 2016
@@ -1795,9 +1795,9 @@ bool Flow::isIdleFlow() {
 
 /* *************************************** */
 
-void Flow::updatePacketStats(InterarrivalStats *stats, const struct timeval *when) {
+void Flow::updatePacketStats(InterarrivalStats *stats, const struct bpf_timeval *when) {
   if(stats->lastTime.tv_sec != 0) {
-    float deltaMS = (float)(Utils::timeval2usec((struct timeval*)when) - Utils::timeval2usec(&stats->lastTime))/(float)1000;
+    float deltaMS = (float)(Utils::timeval2usec(when) - Utils::timeval2usec(&stats->lastTime))/(float)1000;
 
     if(deltaMS > 0) {
       if(stats->max_ms == 0)
@@ -1811,7 +1811,7 @@ void Flow::updatePacketStats(InterarrivalStats *stats,
     }
   }
 
-  memcpy(&stats->lastTime, when, sizeof(struct timeval));
+  memcpy(&stats->lastTime, when, sizeof(struct bpf_timeval));
 }
 
 /* *************************************** */
@@ -1830,8 +1830,8 @@ void Flow::dumpPacketStats(lua_State* vm, bool cli2srv
 
 /* *************************************** */
 
-void Flow::incStats(bool cli2srv_direction, u_int pkt_len,
-		    u_int payload_len, const struct timeval *when) {
+void Flow::incStats(bool cli2srv_direction, u_int32_t pkt_len,
+		    u_int16_t payload_len, const struct bpf_timeval *when) {
   updateSeen();
   updatePacketStats(cli2srv_direction ? &cli2srvStats.pktTime : &srv2cliStats.pktTime, when);
 
